package com.codi.bus.core.resultModel;

import com.codi.base.util.DateUtils;
import com.codi.base.util.StringUtil;
import com.codi.bus.constant.GlobalConstant;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 模块名
 *
 * @author spy
 * @version 1.0 2017-11-06 17:21
 * @since 1.0
 */
@Data
@Accessors(chain = true)
public class PortfolioTradeResult extends BaseResult {

    private String allotNo;  // 申请编号

    private String applyDate;// 申请日期
    private String applyTime;// 申请时间
    private String orderDate;// 下单日期
    private String orderTime;// 下单时间

    public String getApplyTime() {
        if (!StringUtil.isEmpty(applyTime)) {
            Date date = DateUtils.stringToDate(applyTime, GlobalConstant.DATE_FORMAT_HHMMSS);
            return DateUtils.dateToTime(date);
        }
        return this.applyTime;
    }
}
